package com.easy.neo4j.entry;

import lombok.Data;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Objects;

/**
 * @author: CoolPro
 * @Desc:
 * @create: 2024-02-23 16:44
 **/
@Node(labels = "Rail")
@Data
public class Rail implements Serializable {
//    private static final long serialVersionUID = 6810772381697123479L;
    @Id
    @GeneratedValue
    Long id;
    @Property
    private String parkType;
    @Property
    private String bikeNums;
    @Property
    private String centreLon;
    @Property
    private String regionId;
    @Property
    private String cityCode;
    @Property
    private String centreLat;
    @Property
    private String name;
    @Property
    private String[] range;
    @Property
    private String type;
    @Property
    private String desc;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Rail rail = (Rail) o;
        return Objects.equals(parkType, rail.parkType) && Objects.equals(bikeNums, rail.bikeNums) && Objects.equals(centreLon, rail.centreLon) && Objects.equals(regionId, rail.regionId) && Objects.equals(cityCode, rail.cityCode) && Objects.equals(centreLat, rail.centreLat) && Objects.equals(name, rail.name) && Objects.equals(range, rail.range) && Objects.equals(type, rail.type) && Objects.equals(desc, rail.desc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(parkType, bikeNums, centreLon, regionId, cityCode, centreLat, name, range, type, desc);
    }

    @Override
    public String toString() {
        return "Rail{" +
                "parkType='" + parkType + '\'' +
                ", bikeNums='" + bikeNums + '\'' +
                ", centreLon='" + centreLon + '\'' +
                ", regionId='" + regionId + '\'' +
                ", cityCode='" + cityCode + '\'' +
                ", centreLat='" + centreLat + '\'' +
                ", name='" + name + '\'' +
                ", range='" + Arrays.toString(range) + '\'' +
                ", type='" + type + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }

    public Rail(String parkType, String bikeNums, String centreLon, String regionId, String cityCode, String centreLat, String name, String[] range, String type, String desc) {
        this.parkType = parkType;
        this.bikeNums = bikeNums;
        this.centreLon = centreLon;
        this.regionId = regionId;
        this.cityCode = cityCode;
        this.centreLat = centreLat;
        this.name = name;
        this.range = range;
        this.type = type;
        this.desc = desc;
    }

    public Rail() {
    }

    public String getParkType() {
        return parkType;
    }

    public void setParkType(String parkType) {
        this.parkType = parkType;
    }

    public String getBikeNums() {
        return bikeNums;
    }

    public void setBikeNums(String bikeNums) {
        this.bikeNums = bikeNums;
    }

    public String getCentreLon() {
        return centreLon;
    }

    public void setCentreLon(String centreLon) {
        this.centreLon = centreLon;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCentreLat() {
        return centreLat;
    }

    public void setCentreLat(String centreLat) {
        this.centreLat = centreLat;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String[] getRange() {
        return range;
    }

    public void setRange(String[] range) {
        this.range = range;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}